<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>dadi.lbfgsb</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://dadi.googlecode.com">dadi</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="dadi-module.html">Package&nbsp;dadi</a> ::
        Module&nbsp;lbfgsb
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="dadi.lbfgsb-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module lbfgsb</h1><p class="nomargin-top"></p>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="dadi.lbfgsb-module.html#fmin_l_bfgs_b" class="summary-sig-name">fmin_l_bfgs_b</a>(<span class="summary-sig-arg">func</span>,
        <span class="summary-sig-arg">x0</span>,
        <span class="summary-sig-arg">fprime</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">args</span>=<span class="summary-sig-default"><code class="variable-group">(</code><code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">approx_grad</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">bounds</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">m</span>=<span class="summary-sig-default">10</span>,
        <span class="summary-sig-arg">factr</span>=<span class="summary-sig-default">10000000.0</span>,
        <span class="summary-sig-arg">pgtol</span>=<span class="summary-sig-default">1e-05</span>,
        <span class="summary-sig-arg">epsilon</span>=<span class="summary-sig-default">1e-08</span>,
        <span class="summary-sig-arg">iprint</span>=<span class="summary-sig-default">-1</span>,
        <span class="summary-sig-arg">maxfun</span>=<span class="summary-sig-default">15000</span>)</span><br />
      Minimize a function func using the L-BFGS-B algorithm.</td>
          <td align="right" valign="top">
            
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'dadi'"><code class="variable-quote">'</code><code class="variable-string">dadi</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="fmin_l_bfgs_b"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">fmin_l_bfgs_b</span>(<span class="sig-arg">func</span>,
        <span class="sig-arg">x0</span>,
        <span class="sig-arg">fprime</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">args</span>=<span class="sig-default"><code class="variable-group">(</code><code class="variable-group">)</code></span>,
        <span class="sig-arg">approx_grad</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">bounds</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">m</span>=<span class="sig-default">10</span>,
        <span class="sig-arg">factr</span>=<span class="sig-default">10000000.0</span>,
        <span class="sig-arg">pgtol</span>=<span class="sig-default">1e-05</span>,
        <span class="sig-arg">epsilon</span>=<span class="sig-default">1e-08</span>,
        <span class="sig-arg">iprint</span>=<span class="sig-default">-1</span>,
        <span class="sig-arg">maxfun</span>=<span class="sig-default">15000</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

 Minimize a function func using the L-BFGS-B algorithm.

 Parameters
 ----------
 func : callable f(x, *args)
     Function to minimise.
 x0 : ndarray
     Initial guess.
 fprime : callable fprime(x, *args)
     The gradient of `func`.  If None, then `func` returns the function
     value and the gradient (``f, g = func(x, *args)``), unless
     `approx_grad` is True in which case `func` returns only ``f``.
 args : tuple
     Arguments to pass to `func` and `fprime`.
 approx_grad : bool
     Whether to approximate the gradient numerically (in which case
     `func` returns only the function value).
 bounds : list
     ``(min, max)`` pairs for each element in ``x``, defining
     the bounds on that parameter. Use None for one of ``min`` or
     ``max`` when there is no bound in that direction.
 m : int
     The maximum number of variable metric corrections
     used to define the limited memory matrix. (The limited memory BFGS
     method does not store the full hessian but uses this many terms in an
     approximation to it.)
 factr : float
     The iteration stops when
     ``(f^k - f^{k+1})/max{|f^k|,|f^{k+1}|,1} &lt;= factr * eps``,
     where ``eps`` is the machine precision, which is automatically
     generated by the code. Typical values for `factr` are: 1e12 for
     low accuracy; 1e7 for moderate accuracy; 10.0 for extremely
     high accuracy.
 pgtol : float
     The iteration will stop when
     ``max{|proj g_i | i = 1, ..., n} &lt;= pgtol``
     where ``pg_i`` is the i-th component of the projected gradient.
 epsilon : float
     Step size used when `approx_grad` is True, for numerically
     calculating the gradient
 iprint : int
     Controls the frequency of output. ``iprint &lt; 0`` means no output.
 maxfun : int
     Maximum number of function evaluations.

 Returns
 -------
 x : ndarray
     Estimated position of the minimum.
 f : float
     Value of `func` at the minimum.
 d : dict
     Information dictionary.

     d['warnflag'] is
         0 if converged,
         1 if too many function evaluations,
         2 if stopped for another reason, given in d['task']
     d['grad'] is the gradient at the minimum (should be 0 ish)
     d['funcalls'] is the number of function calls made.


Notes
-----

License of L-BFGS-B (Fortran code):

The version included here (in fortran code) is 2.1 (released in
1997). It was written by Ciyou Zhu, Richard Byrd, and Jorge Nocedal
&lt;nocedal@ece.nwu.edu&gt;. It carries the following condition for use:

This software is freely available, but we expect that all
publications describing work using this software, or all
commercial products using it, quote at least one of the references
given below.

References
  * R. H. Byrd, P. Lu and J. Nocedal. A Limited Memory Algorithm for Bound
    Constrained Optimization, (1995), SIAM Journal on Scientific and
    Statistical Computing , 16, 5, pp. 1190-1208.
  * C. Zhu, R. H. Byrd and J. Nocedal. L-BFGS-B: Algorithm 778: L-BFGS-B,
    FORTRAN routines for large scale bound constrained optimization (1997),
    ACM Transactions on Mathematical Software, Vol 23, Num. 4, pp. 550 - 560.

 

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://dadi.googlecode.com">dadi</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    <a href="epydoc-log.html">Generated by Epydoc
    3.0.1 on Mon Oct  4 16:18:37 2010</a>
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
